package com.zhangxin.designmode.designpattern.singleten;

/**
 * 内部类 懒汉单例
 *
 * @author zhangxin
 * @date 2022/4/26
 */
public class Singleton4Demo {

    private static class SingletonHolder {
        private static final Singleton4Demo instance = new Singleton4Demo();
    }

    public static Singleton4Demo getInstance() {
        return SingletonHolder.instance;
    }
}
